

ac.buff('召唤物') {

    phycisc = true,

    art = [[ReplaceableTextures\CommandButtons\BTNAuraOfDarkness.blp]],

    title = "|cff00ff00召唤物|r",

    tip = "该单位是个召唤物.",
    model1 = [[Abilities\Spells\Orc\FeralSpirit\feralspiritdone.mdl]],
    pulse = 1.0,

    time = -1,

    on_add = function(self)
        local unit = self.owner
        local source = self.source 
        unit:play_animation('birth')
        unit:notify('单位-被召唤', unit, source, self)
        source:notify('单位-召唤单位', source, unit, self)
        self:gc(source:on "单位-死亡" (function ()
            self.has_kill = true
            self:remove()
        end))
        self:notify("on_summon")
		unit:add_effect(self.model1):remove()
    end,

    on_pulse = function(self)
        local unit = self.owner
        self:set_stack(math.ceil(self:get_remaining()))
        unit.ui_title = ('%s(|cff00ff00%0.f秒|r)'):format(unit.title or unit.name,self:get_remaining())
    end,

    on_finish = function(self)
        self.has_kill = true
        self:notify("on_summon_finish")
    end,

    on_remove = function(self)
        local unit = self.owner
        local source = self.source 
		unit:get_point():add_effect(self.model1):remove()
        unit:notify('单位-被召唤结束', unit, source, self)
        source:notify('单位-召唤单位结束', source, unit, self)
        if self.has_kill then 
            unit:kill()
        end
        unit:remove()
        self:notify("on_summon_remove")
    end,
}